using System;

namespace Baula.TextGen.ActiveTemplating
{
    public abstract class TemplateToVBConversionException : Exception
    {
        private readonly int _column;

        public TemplateToVBConversionException(string message, int column)
            : base(message)
        {
            _column = column;
        }

        public int Column
        {
            get { return _column; }
        }
    }

    public class MissingEndOfInlineExpressionException : TemplateToVBConversionException
    {
        public MissingEndOfInlineExpressionException(int column)
            : base("Missing end of inline expression.", column)
        {
        }
    }

    public class MissingEndOfBlockExpressionException : TemplateToVBConversionException
    {
        public MissingEndOfBlockExpressionException(int column)
            : base("Missing end of block expression.", column)
        {
        }
    }

    public class MissingEndOfStringExpressionException : TemplateToVBConversionException
    {
        public MissingEndOfStringExpressionException(int column) 
            : base("Missing end of string expression.", column)
        {
        }
    }

    public class CannotAppendToClosedTokenException : TemplateToVBConversionException
    {
        public CannotAppendToClosedTokenException(int column) 
            : base("Cannot append to closed token.", column)
        {
        }
    }
}